package org.soderiakelvy.controller.reparto;

import javax.faces.bean.ManagedBean;

import org.soderiakelvy.controller.util.Constante;
import org.soderiakelvy.model.domain.VehiculoVO;
import org.soderiakelvy.model.service.RepartoServicio;
import org.soderiakelvy.model.service.imp.RepartoServicioImp;

@ManagedBean
public class VehiculoCreate {
	private VehiculoVO vehiculo;
	private RepartoServicio service;
	
	//--- CONSTRUCTOR---
	public VehiculoCreate(){
		vehiculo = new VehiculoVO();
		service	= new RepartoServicioImp();
	}
	
	public String guardarVehiculo(VehiculoVO vechiculo){
		service.insertVehiculo(vechiculo);
		return Constante.URL_VEHICULO_LIST;
	}

	
	public String cancelarAltaVehiculo(){
		return null;
	}
	//--- GET AND SET
	public VehiculoVO getVehiculo() {
		return vehiculo;
	}

	public void setVehiculo(VehiculoVO vehiculo) {
		this.vehiculo = vehiculo;
	}
	
}
